home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Table / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  3.1 KB  |  116 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 3 $ 
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef TBLPART_H
  11. #define TBLPART_H
  12.  
  13. // ----- TablePart Includes -----
  14.  
  15. #ifndef DEFINES_K
  16. #include "Defines.k"
  17. #endif
  18.  
  19. // ----- ODF Includes -----
  20.  
  21. #ifndef FWPARTNG_H
  22. #include "FWPartng.h"
  23. #endif
  24.  
  25. #ifndef FWMNUITM_H
  26. #include "FWMnuItm.h"
  27. #endif
  28.  
  29. #ifndef FWPOINT_H
  30. #include "FWPoint.h"
  31. #endif
  32.  
  33. #ifndef FWFXMATH_H
  34. #include "FWFxMath.h"
  35. #endif
  36.  
  37. //========================================================================================
  38. //    Forward declarations
  39. //========================================================================================
  40.  
  41. class CTableSelection;
  42. class CTableLinkManager;
  43. class CCell;
  44. class CTablePartContent;
  45.  
  46. //========================================================================================
  47. //    class CTablePart
  48. //========================================================================================
  49.  
  50. class CTablePart : public FW_CEmbeddingPart
  51. {
  52.   public:
  53.     friend class CTableLinkManager;    
  54.  
  55.     FW_DECLARE_AUTO(CTablePart)
  56.  
  57. //----------------------------------------------------------------------------------------
  58. //    Initialization/Destruction
  59. //
  60. public:
  61.     CTablePart(ODPart* odPart);
  62.     virtual ~CTablePart();
  63.  
  64. //----------------------------------------------------------------------------------------
  65. //    API Inherited from FW_CPart
  66. //
  67. public:
  68.     virtual void                Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);
  69.                 
  70.     // ----- Factory Methods -----
  71.     virtual FW_CFrame*             NewFrame(Environment* ev, 
  72.                                      ODFrame* odFrame, 
  73.                                      FW_CPresentation* presentation,
  74.                                      FW_Boolean fromStorage);
  75.     virtual FW_CContent*         NewPartContent(Environment* ev);
  76.     virtual FW_CLinkManager*    NewLinkManager(Environment* ev);    // Override
  77.  
  78.                                         
  79.     // ----- About -----
  80.     virtual FW_Handled            DoAbout(Environment* ev);
  81.     
  82. //----------------------------------------------------------------------------------------
  83. //    New API
  84. //
  85. public:
  86.       // ----- Other Initialization -----
  87.     void                 DoPostCreate(Environment* ev);
  88.  
  89.     // ----- Change -----
  90.     void                PartChanged(Environment* ev);
  91.     
  92.     CTablePartContent*    GetTableContent(Environment*) const
  93.                                 {return fTableContent;}
  94.     FW_CPresentation*    GetTablePresentation(Environment*) const
  95.                                 {return fTablePresentation;}
  96.                                 
  97.     // ----- Linking Support -----
  98.     CTableSelection*    GetTableSelection(Environment* ev);
  99.  
  100.     void                AboutToClearCell(Environment* ev, const CCell& cell);
  101.     void                ChangeFrameStatus(Environment* ev, const CCell& cell, ODLinkStatus newStatus);
  102.     void                ProxyMoved(Environment* ev, const CCell& fromCell, const CCell& toCell);
  103.  
  104. //----------------------------------------------------------------------------------------
  105. //    Data Members
  106. //
  107. private:
  108.       CTablePartContent*        fTableContent;
  109.      FW_CPresentation*        fTablePresentation;
  110.     
  111.     CTableLinkManager*        fTableLinkManager;
  112.     FW_Boolean                fPostCreated;
  113. };
  114.  
  115. #endif
  116.